import React from 'react';
import { connect } from 'react-redux';
import {
    RecommendWrapper,
    RecommendItem,
} from '../style';


const Recommend = (props) => (
    <RecommendWrapper>
        {
            props.recommendList.map((item) => (
                <RecommendItem key={item.get("id")} imgUrl={item.get("imgUrl")} />
            ))
        }
    </RecommendWrapper>
);

const mapStateToProps = (state) => ({
    recommendList: state.getIn(["home", "recommendList"]),
});
const mapDispatchToProps = null;

export default connect(mapStateToProps, mapDispatchToProps)(Recommend);